package com.laiat.location;

import android.os.Parcel;
import android.os.Parcelable;

public class Email implements Parcelable {

	private String sender;
	private String recipient;
	private String subject;
	private String body;

	public Email(String sender, String recipient, String subject, String body) {
		this.sender = sender;
		this.recipient = recipient;
		this.subject = subject;
		this.body = body;
	}

	public String getSender() {
		return sender;
	}

	public String getRecipient() {
		return recipient;
	}

	public String getSubject() {
		return subject;
	}

	public String getBody() {
		return body;
	}

	@Override
	public int describeContents() {
		return recipient.hashCode();
	}

	@Override
	public void writeToParcel(Parcel parcel, int ignored) {
		parcel.writeString(sender);
		parcel.writeString(recipient);
		parcel.writeString(subject);
		parcel.writeString(body);
	}

	public static final Parcelable.Creator<Email> CREATOR = new Parcelable.Creator<Email>() {

		@Override
		public Email createFromParcel(Parcel parcel) {
			Email email = new Email(parcel.readString(), parcel.readString(),
					parcel.readString(), parcel.readString());
			return email;
		}

		@Override
		public Email[] newArray(int size) {
			throw new UnsupportedOperationException();
		}
	};

}
